package cn.itcast.controller;

import cn.itcast.domain.Cook;
import cn.itcast.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/cook")
public class CookController {

    @Resource
    private UserService service;

    @RequestMapping("/findCookBypage.do")
    @ResponseBody
    public List<Cook> findCookBypage(String crux){
        List<Cook> list =service.findCook(crux);
        return list;
    }
}
